package com.foreknow.mapping;

import com.foreknow.bean.Guestbook;

import java.sql.ResultSet;
import java.sql.SQLException;

public class GuestbookMapping implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Guestbook guestbook = new Guestbook();
        guestbook.setId(rs.getInt("Id"));
        guestbook.setName(rs.getString("Name"));
        guestbook.setPhone(rs.getString("Phone"));
        guestbook.setEmail(rs.getString("Email"));
        guestbook.setTitle(rs.getString("Title"));
        guestbook.setContent(rs.getString("Content"));
        guestbook.setCreatedtime(rs.getString("Createdtime"));
        return guestbook;
    }
}
